@extends('common.base-master')

@section('html-head')
@endsection

@section('html-body')
    <div class="myexchange-page">
        <div class="status-container">
            <div class="status-item @if($type == 'dfh')on @endif" onclick="window.location.href='{{route('Home.User.myexchange')}}?type=dfh'">
                待发货
            </div>
            <span class="border"></span>
            <div class="status-item @if($type == 'yfh')on @endif" onclick="window.location.href='{{route('Home.User.myexchange')}}?type=yfh'">
                待收货
            </div>
            <span class="border"></span>
            <div class="status-item @if($type == 'ywc')on @endif" onclick="window.location.href='{{route('Home.User.myexchange')}}?type=ywc'">
                已完成
            </div>
        </div>
        <div class="order-list">
            @foreach($my_orders as $order)
            <div class="order-item">
                <div class="order-title">
                    <span class="bg-order_icon"></span>
                    <div class="order-id">
                        订单号：<?php echo substr_replace($order->order_num,'',0,8); ?>
                    </div>
                    <div class="order-time">
                        {{$order->created_at}}
                    </div>
                </div>
                <div class="order-content">
                    <img  class="product-img" src="@if(!is_null($order->good)){{route('Api.Image.ShowPX',['id'=>$order->good->thumb_id,'px'=>'300px'])}}@else {{url('images/default_product.png')}}@endif" alt="">
                    {{--<div class="product-num">BL100-05</div>--}}
                    <div class="product-name" style="width:70%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">@if(!is_null($order->good)){{$order->good->name}}@endif</div>
                    <div class="product-price">￥@if(!is_null($order->good)){{$order->good->amount}}@endif×{{$order->num}}</div>
                    <div class="product-type">总价：{{$order->amount}}</div>
                    {{--<a href="#" class="product-detail"><img  src="{{url('css/icons/right_pink_icon.png')}}" alt=""></a>--}}
                    <div class="product-status waiting @if($type != 'dfh')hidden @endif">正在处理请耐心等候……</div>
                    <div class="product-status received @if($type != 'yfh')hidden @endif">已收货</div>
                    <a href="" class="product-status check-express @if($type != 'yfh')hidden @endif">查看物流</a>
                </div>
            </div>
            @endforeach
        </div>
    </div>
    <script>
        $(document).ready(function () {

        })
    </script>
@endsection